In [1]:
import sys
import io
In [2]:
io?
In [3]:
io??
In [4]:
# IPython Quick Refence
%quickref
In [5]:
# Python Refence
help()
In [ ]:
%pdoc io.FileIO
In [7]:
%pdef io.OpenWrapper
In [8]:
%psource io
In [9]:
%pfile io
In [10]:
# Browse an object with tab
sys
Out[10]:
In [ ]:
# Shift-tab to get more information about a method
open()
In [12]:
# Listing all magic
%lsmagic
Out[12]:
In [13]:
# Measuring Performance
%timeit range(1000)
%timeit xrange(1000)
In [14]:
%%timeit
# Measuring Block Performance
for x in range(1000):
y=x+1
In [15]:
%%timeit
# Measuring Block Performance
for x in xrange(1000):
y=x+1
In [16]:
# Reset (Delete) all variables
%reset
In [17]:
%%bash
echo $PATH
You have access to all code inside you code cell and the out put from them in two lists: In and Out.
In [18]:
3+5
Out[18]:
In [21]:
In[18]
Out[21]:
In [22]:
Out[18]
Out[22]:
In [23]:
_ + 3
Out[23]:
In [24]:
_ - 4
Out[24]: